package com.weijianhuawen.wjblog.common.utils;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

/**
 * @version: java version 17
 * @Author: weijianhuawen
 * @description:
 * @date: 2025-04-26 23:58
 */
public class DateUtil {
    /**
     * 将时间转换为时间戳
     * @param localDateTime
     * @return
     */
    public static long localDateTime2TimeStamp(LocalDateTime localDateTime) {
        return localDateTime.toInstant(ZoneOffset.UTC).toEpochMilli();
    }
}
